<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>版本变更说明 | d2-crud-plus</title>
    <meta name="generator" content="VuePress 1.5.2">
    <link rel="icon" href="/d2-crud-plus/icon-only.png">
    <link rel="manifest" href="/d2-crud-plus/manifest.json">
    <link rel="apple-touch-icon" href="/d2-crud-plus/icons/apple-touch-icon-152x152.png">
    <link rel="mask-icon" href="/d2-crud-plus/icons/safari-pinned-tab.svg" color="#3eaf7c">
    <meta name="description" content="d2-crud-plus doc">
    <meta name="theme-color" content="#3eaf7c">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="msapplication-TileImage" content="/icons/msapplication-icon-144x144.png">
    <meta name="msapplication-TileColor" content="#000000">
    <link rel="preload" href="/d2-crud-plus/assets/css/0.styles.094573b2.css" as="style"><link rel="preload" href="/d2-crud-plus/assets/js/app.920fe806.js" as="script"><link rel="preload" href="/d2-crud-plus/assets/js/2.9f3ba775.js" as="script"><link rel="preload" href="/d2-crud-plus/assets/js/15.1ff1eab0.js" as="script"><link rel="prefetch" href="/d2-crud-plus/assets/js/10.768312da.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/11.88f0302a.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/12.0a517745.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/13.a305030c.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/14.d7129909.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/16.b84cb74e.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/17.0e17fa97.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/18.b4667ec6.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/19.4a1d2603.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/20.e542b5eb.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/21.bea29276.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/22.5834f6ce.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/23.d514eada.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/24.10003849.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/25.238b33f6.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/26.64d5f744.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/27.20999cf2.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/28.a0ae569e.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/29.958d25f6.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/3.6fc0af51.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/30.5daeb87d.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/31.8f2a2581.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/32.bf1a9e00.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/33.fb5669a4.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/34.38bf074e.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/35.4789523c.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/36.5e0ded16.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/37.8b00f742.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/38.49c29967.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/39.f40a50c6.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/4.6d40d8fb.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/40.6422ce3c.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/41.76e6d756.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/42.2571374a.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/43.0e62c77f.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/44.59d7ad10.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/45.81bb2ffe.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/46.712a33f6.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/47.6a6f286c.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/48.25afab63.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/49.f6fd43e8.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/5.8571b144.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/50.5a933b10.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/51.fff19aba.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/52.5b7aa258.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/53.e207b0e8.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/54.c28e9900.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/55.23098b29.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/56.dd2936c0.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/57.e7938457.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/58.d206d759.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/59.066b3e6d.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/6.8660d829.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/60.f55b15a6.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/61.9c91c70f.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/62.bf4ab90c.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/63.1ba8b586.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/64.53572d02.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/65.ba75d2b6.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/66.3b137930.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/67.3f157fd4.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/68.f1e28a8c.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/69.b8844926.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/7.d8550247.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/70.bb6afb7e.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/71.aa8ba6ae.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/8.b8c6f50a.js"><link rel="prefetch" href="/d2-crud-plus/assets/js/9.bb5c3b5b.js">
    <link rel="stylesheet" href="/d2-crud-plus/assets/css/0.styles.094573b2.css">
  </head>
  <body>
    <div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/d2-crud-plus/" class="home-link router-link-active"><!----> <span class="site-name">d2-crud-plus</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/d2-crud-plus/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="http://qiniu.veryreader.com/D2CrudPlusExample/index.html" target="_blank" rel="noopener noreferrer" class="nav-link external">
  演示
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <a href="https://github.com/greper/d2-crud-plus" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/d2-crud-plus/guide/" class="nav-link router-link-active">
  指南
</a></div><div class="nav-item"><a href="http://qiniu.veryreader.com/D2CrudPlusExample/index.html" target="_blank" rel="noopener noreferrer" class="nav-link external">
  演示
  <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></div> <a href="https://github.com/greper/d2-crud-plus" target="_blank" rel="noopener noreferrer" class="repo-link">
    GitHub
    <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav>  <ul class="sidebar-links"><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>指南</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/d2-crud-plus/guide/" class="sidebar-link">介绍</a></li><li><a href="/d2-crud-plus/guide/quickstart.html" class="sidebar-link">快速上手</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>进阶</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/d2-crud-plus/guide/mixins.html" class="sidebar-link">d2CrudPlus.crud</a></li><li><a href="/d2-crud-plus/guide/options.html" class="sidebar-link">crud配置项</a></li><li><a href="/d2-crud-plus/guide/structure.html" class="sidebar-link">数据结构</a></li><li><a href="/d2-crud-plus/guide/component.html" class="sidebar-link">组件配置</a></li><li><a href="/d2-crud-plus/guide/column-type.html" class="sidebar-link">字段类型</a></li><li><a href="/d2-crud-plus/guide/types.html" class="sidebar-link">字段类型列表</a></li><li><a href="/d2-crud-plus/guide/slot.html" class="sidebar-link">slot自定义</a></li><li><a href="/d2-crud-plus/guide/extends.html" class="sidebar-link">自定义扩展</a></li><li><a href="/d2-crud-plus/guide/dict.html" class="sidebar-link">数据字典</a></li><li><a href="/d2-crud-plus/guide/event.html" class="sidebar-link">事件监听</a></li><li><a href="/d2-crud-plus/guide/flat-data.html" class="sidebar-link">数据扁平化</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>附加功能</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/d2-crud-plus/guide/permission.html" class="sidebar-link">权限管理</a></li><li><a href="/d2-crud-plus/guide/generate.html" class="sidebar-link">代码生成</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading open"><span>更多帮助</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/d2-crud-plus/guide/upgrade.html" class="sidebar-link">版本升级</a></li><li><a href="/d2-crud-plus/guide/breakingchange.html" class="active sidebar-link">版本变更说明</a></li><li><a href="/d2-crud-plus/guide/questions.html" class="sidebar-link">常见问题</a></li><li><a href="/d2-crud-plus/guide/contact.html" class="sidebar-link">联系作者</a></li></ul></section></li><li><section class="sidebar-group depth-0"><p class="sidebar-heading"><span>extends文档</span> <!----></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/d2-crud-plus/guide/extends/area-selector.html" class="sidebar-link">省市区选择组件</a></li><li><a href="/d2-crud-plus/guide/extends/avatar-cropper.html" class="sidebar-link">头像裁剪上传</a></li><li><a href="/d2-crud-plus/guide/extends/file-uploader.html" class="sidebar-link">文件上传组件</a></li><li><a href="/d2-crud-plus/guide/extends/full-editor.html" class="sidebar-link">富文本</a></li><li><a href="/d2-crud-plus/guide/extends/icon-selector.html" class="sidebar-link">icon选择组件</a></li><li><a href="/d2-crud-plus/guide/extends/tree-selector.html" class="sidebar-link">树形选择组件</a></li><li><a href="/d2-crud-plus/guide/extends/uploader.html" class="sidebar-link">文件上传lib</a></li></ul></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>组件文档</span> <span class="arrow right"></span></p> <!----></section></li><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading"><span>ChangeLog</span> <span class="arrow right"></span></p> <!----></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="版本变更说明"><a href="#版本变更说明" class="header-anchor">#</a> 版本变更说明</h1> <h2 id="_1-15-x-多级数据支持"><a href="#_1-15-x-多级数据支持" class="header-anchor">#</a> 1.15.x  多级数据支持</h2> <ul><li>&quot;d2-crud-plus&quot;: &quot;^1.15.x&quot;</li> <li>&quot;d2-crud-x&quot;: &quot;^2.8.x&quot;</li> <li>&quot;d2p-extends&quot;: &quot;^1.9.x&quot;</li></ul> <h3 id="多级数据支持"><a href="#多级数据支持" class="header-anchor">#</a> 多级数据支持</h3> <p><a href="/d2-crud-plus/guide/flat-data.html">数据扁平化配置</a></p> <div class="language-js extra-class"><pre class="language-js"><code>records<span class="token operator">=</span><span class="token punctuation">[</span><span class="token punctuation">{</span>
  user<span class="token punctuation">:</span><span class="token punctuation">{</span>name<span class="token punctuation">:</span><span class="token string">'小明'</span><span class="token punctuation">,</span>gender<span class="token punctuation">:</span><span class="token number">1</span><span class="token punctuation">}</span>
<span class="token punctuation">}</span><span class="token punctuation">]</span>
</code></pre></div><h3 id="show-disabled-readonly-方法参数"><a href="#show-disabled-readonly-方法参数" class="header-anchor">#</a> show disabled readonly 方法参数</h3> <p>组件的show disabled readonly 属性传入方法时，支持获取form等上下文参数</p> <div class="language-js extra-class"><pre class="language-js"><code>columns<span class="token operator">=</span><span class="token punctuation">[</span>
    <span class="token punctuation">{</span>
      component<span class="token punctuation">:</span><span class="token punctuation">{</span>
        <span class="token function">disabled</span><span class="token punctuation">(</span><span class="token parameter">context</span><span class="token punctuation">)</span><span class="token punctuation">{</span>
          <span class="token keyword">return</span> context<span class="token punctuation">.</span>form<span class="token punctuation">.</span>xxx<span class="token operator">===</span><span class="token number">0</span>
        <span class="token punctuation">}</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">]</span>
</code></pre></div><h2 id="_1-14-x-查看按钮"><a href="#_1-14-x-查看按钮" class="header-anchor">#</a> 1.14.x  查看按钮</h2> <ul><li>&quot;d2-crud-plus&quot;: &quot;^1.14.x&quot;</li> <li>&quot;d2-crud-x&quot;: &quot;^2.7.x&quot;</li></ul> <h3 id="查看按钮"><a href="#查看按钮" class="header-anchor">#</a> 查看按钮</h3> <div class="language-js extra-class"><pre class="language-js"><code>crudOptions<span class="token operator">=</span><span class="token punctuation">{</span>
    viewOptions<span class="token punctuation">:</span><span class="token punctuation">{</span>
        disabled<span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">,</span> <span class="token comment">// 开启view按钮，默认关闭</span>
        componentType<span class="token punctuation">:</span> <span class="token string">'form'</span> <span class="token comment">//使用哪种组件展示【form=使用表单组件（默认）,row=使用行展示组件】</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    rowHandle<span class="token punctuation">:</span><span class="token punctuation">{</span>
        view<span class="token punctuation">:</span><span class="token punctuation">{</span><span class="token punctuation">}</span> <span class="token comment">//查看按钮样式配置</span>
    <span class="token punctuation">}</span><span class="token punctuation">,</span>
    columns<span class="token punctuation">:</span><span class="token punctuation">[</span>
       <span class="token punctuation">{</span>
         key<span class="token punctuation">:</span><span class="token string">'xx'</span><span class="token punctuation">,</span>
         title<span class="token punctuation">:</span><span class="token string">'xx'</span><span class="token punctuation">,</span>
         view<span class="token punctuation">:</span><span class="token punctuation">{</span><span class="token punctuation">}</span> <span class="token comment">//view组件单独配置</span>
       <span class="token punctuation">}</span>
    <span class="token punctuation">]</span>
<span class="token punctuation">}</span>
</code></pre></div><p>传入参数配置</p> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>d2-crud-x</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>d2Crud<span class="token punctuation">&quot;</span></span>
           <span class="token attr-name">v-bind</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>_crudProps<span class="token punctuation">&quot;</span></span>
           <span class="token attr-name">v-on</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>_crudListeners<span class="token punctuation">&quot;</span></span><span class="token punctuation">/&gt;</span></span>

<span class="token comment">&lt;!-- 或者旧版基础上增加参数 --&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>d2-crud-x</span> <span class="token attr-name">:viewTemplate</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>crud.viewTemplate<span class="token punctuation">&quot;</span></span> <span class="token punctuation">/&gt;</span></span> 


</code></pre></div><h2 id="_1-13-x-联动功能优化"><a href="#_1-13-x-联动功能优化" class="header-anchor">#</a> 1.13.x  联动功能优化</h2> <ul><li>&quot;d2-crud-plus&quot;: &quot;^1.13.x&quot;</li> <li>&quot;d2-crud-x&quot;: &quot;^2.6.x&quot;</li></ul> <h3 id="变更"><a href="#变更" class="header-anchor">#</a> 变更</h3> <ol><li><p>实验性支持vxe-table<br>
vxe-table 性能还不错</p></li> <li><p>valueChange增强</p></li></ol> <div class="language-js extra-class"><pre class="language-js"><code><span class="token punctuation">{</span>
  form<span class="token punctuation">:</span> <span class="token punctuation">{</span>
      <span class="token comment">/**
       *  valueChange 功能增强
       *  key
       *  value 当前选择的值
       *  form 当前表单
       *  getColumn 获取字段配置的方法，getColumn(keyName) 返回keyName的字段配置，可以动态修改组件配置
       *  mode 当前模式:【add、edit、search】
       *  component 当前组件的ref
       *  immediate 是否是对话框打开后立即触发的
       *  getComponent 获取组件Ref的方法， getComponent(keyName), 返回组件ref，可以动态调用该组件的方法
       */</span>
      <span class="token function">valueChange</span> <span class="token punctuation">(</span><span class="token parameter">key<span class="token punctuation">,</span> value<span class="token punctuation">,</span> form<span class="token punctuation">,</span> <span class="token punctuation">{</span> getColumn<span class="token punctuation">,</span> mode<span class="token punctuation">,</span> component<span class="token punctuation">,</span> immediate<span class="token punctuation">,</span> getComponent <span class="token punctuation">}</span></span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
      <span class="token punctuation">}</span><span class="token punctuation">,</span>
      valueChangeImmediate<span class="token punctuation">:</span> <span class="token boolean">false</span> <span class="token comment">// 是否在编辑框打开后立即触发一次valueChange方法</span>
  <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div><ol start="3"><li>dict-x组件支持dict.url变更触发加载字典数据,支持重新加载字典数据</li></ol> <div class="language-js extra-class"><pre class="language-js"><code><span class="token function">valueChange</span><span class="token punctuation">(</span><span class="token parameter">key<span class="token punctuation">,</span>value<span class="token punctuation">,</span>form<span class="token punctuation">,</span><span class="token punctuation">{</span>getColumn<span class="token punctuation">,</span>component<span class="token punctuation">}</span></span><span class="token punctuation">)</span><span class="token punctuation">{</span>
    <span class="token function">getColumn</span><span class="token punctuation">(</span><span class="token string">'selectKey'</span><span class="token punctuation">)</span><span class="token punctuation">.</span>component<span class="token punctuation">.</span>props<span class="token punctuation">.</span>dict<span class="token punctuation">.</span>url <span class="token operator">=</span> <span class="token string">'/dict/url'</span> <span class="token comment">//触发更新字典数据</span>
    component<span class="token punctuation">.</span><span class="token function">reloadDict</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token comment">// 直接触发更新字典数据</span>
    component<span class="token punctuation">.</span><span class="token function">clearDict</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token comment">// 直接清除字典数据及选项</span>
<span class="token punctuation">}</span>
</code></pre></div><ol start="4"><li>【break change】 dict.url() 改为返回一个url
dict.url 支持动态构建</li></ol> <div class="language-js extra-class"><pre class="language-js"><code><span class="token punctuation">{</span>
    dict<span class="token punctuation">:</span> <span class="token punctuation">{</span>
      <span class="token comment">// url 传入一个方法时，返回一个url，将会以此url获取字典项</span>
      <span class="token function">url</span> <span class="token punctuation">(</span>dict<span class="token punctuation">,</span> <span class="token punctuation">{</span> form <span class="token punctuation">,</span> component <span class="token comment">/* 当前的组件ref */</span> <span class="token punctuation">}</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span>form <span class="token operator">&amp;&amp;</span> form<span class="token punctuation">.</span>province <span class="token operator">!=</span> <span class="token keyword">null</span><span class="token punctuation">)</span> <span class="token punctuation">{</span> 
          <span class="token keyword">return</span> <span class="token string">'/linkage/city?province='</span> <span class="token operator">+</span> form<span class="token punctuation">.</span>province
        <span class="token punctuation">}</span>
        <span class="token keyword">return</span> <span class="token keyword">undefined</span> <span class="token comment">// 返回undefined 将不加载字典</span>
      <span class="token punctuation">}</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div><ol start="5"><li>记住每页条数
用户选择过每页条数后，将会保存在localStorage</li></ol> <div class="language-js extra-class"><pre class="language-js"><code><span class="token keyword">const</span> crudOptions <span class="token operator">=</span> <span class="token punctuation">{</span>
    pagination<span class="token punctuation">:</span><span class="token punctuation">{</span> 
        storage<span class="token punctuation">:</span> <span class="token boolean">true</span> <span class="token comment">// true=默认开启， false=关闭，string=保存时的key后缀</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre></div><ol start="6"><li>记住列设置
列设置会保存在localStorage</li></ol> <div class="language-html extra-class"><pre class="language-html"><code>//storage配置同上
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>crud-toolbar</span> <span class="token attr-name">:storage</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">'</span>true<span class="token punctuation">'</span></span><span class="token punctuation">/&gt;</span></span>
</code></pre></div><ol start="7"><li>d2-crud-x 属性和事件配置简化</li></ol> <div class="language-html extra-class"><pre class="language-html"><code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>d2-crud-x</span>
    <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>d2Crud<span class="token punctuation">&quot;</span></span>
    <span class="token attr-name">v-bind</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>_crudProps<span class="token punctuation">&quot;</span></span>
    <span class="token attr-name">v-on</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>_crudListeners<span class="token punctuation">&quot;</span></span>
<span class="token punctuation">&gt;</span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>d2-crud-x</span><span class="token punctuation">&gt;</span></span>
</code></pre></div><h2 id="_1-12-x-新版页面（带toolbar）"><a href="#_1-12-x-新版页面（带toolbar）" class="header-anchor">#</a> 1.12.x 新版页面（带toolbar）</h2> <ul><li>&quot;d2-crud-plus&quot;: &quot;^1.12.x&quot;</li> <li>&quot;d2-crud-x&quot;: &quot;^2.5.x&quot;</li> <li>&quot;d2p-extends&quot;: &quot;^1.7.x&quot;</li></ul> <p>本次更新完全向下兼容，<a href="http://qiniu.veryreader.com/D2CrudPlusExample/index.html#/demo/form/old" target="_blank" rel="noopener noreferrer">旧版页面<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>  升级后不受影响<br>
如果旧版本页面需要升级到新版本页面，请点击<a href="http://qiniu.veryreader.com/D2CrudPlusExample/index.html#/demo/form/toolbar" target="_blank" rel="noopener noreferrer">新版页面示例<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a>页面的帮助按钮，查看升级方法</p></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/greper/d2-crud-plus/edit/master//d2-crud-plus-docs/guide/breakingchange.md" target="_blank" rel="noopener noreferrer">在 GitHub 上编辑此页</a> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></div> <div class="last-updated"><span class="prefix">上次更新:</span> <span class="time">2020-8-5 5:48:24 PM</span></div></footer> <div class="page-nav"><p class="inner"><span class="prev">
      ←
      <a href="/d2-crud-plus/guide/upgrade.html" class="prev">
        版本升级
      </a></span> <span class="next"><a href="/d2-crud-plus/guide/questions.html">
        常见问题
      </a>
      →
    </span></p></div> </main></div><div class="global-ui"></div></div>
    <script src="/d2-crud-plus/assets/js/app.920fe806.js" defer></script><script src="/d2-crud-plus/assets/js/2.9f3ba775.js" defer></script><script src="/d2-crud-plus/assets/js/15.1ff1eab0.js" defer></script>
  </body>
</html>
